package com.ease.access.auditlog.service.impl;

import com.ease.access.auditlog.service.AuditLogAccessService;
import com.ease.model.system.AuditLog;
import com.ease.platform.access.service.impl.AbstractParameterizedBeanIbatisAccessServiceImpl;

public class AuditLogAccessServiceImpl extends AbstractParameterizedBeanIbatisAccessServiceImpl<AuditLog> implements AuditLogAccessService {
	//
	// public static class NamedStatment {
	//
	// public static final String findOperatorHits =
	// "SELECT T.OPERATOR OPERATOR_, SUM(T.E_) ERROR_, SUM(T.W_) WARN_, SUM(T.D_) DEBUG_, SUM(T.E_)+SUM(T.W_)+SUM(T.D_) TOTAL_ FROM (SELECT AL.OPERATOR, DECODE(AL.AUDITLOGSEVERITY, 'ERROR', COUNT(0), 0) E_, DECODE(AL.AUDITLOGSEVERITY, 'WARN', COUNT(0), 0) W_, DECODE(AL.AUDITLOGSEVERITY, 'DEBUG', COUNT(0), 0) D_ FROM SM_AUDITLOG AL GROUP BY AL.OPERATOR, AL.AUDITLOGSEVERITY) T GROUP BY T.OPERATOR ORDER  BY TOTAL_ DESC, ERROR_ DESC, WARN_ DESC, DEBUG_ DESC";
	//
	// public static final String findModuleHits =
	// "SELECT T.PACKAGE_, SUM(T.COUNT_) COUNT_ FROM (SELECT SUBSTR(AL.INTERFACEOPERATION, 1, INSTR(AL.INTERFACEOPERATION, '.', 1, 4)) PACKAGE_, AL.INTERFACEOPERATION, COUNT(0) COUNT_ FROM SM_AUDITLOG AL GROUP BY AL.INTERFACEOPERATION) T GROUP BY T.PACKAGE_";
	// }
	//
	// public List<Map<String, Object>> findOperatorHits() {
	// return this.getJdbcTemplateDataAccessObject().find(NamedStatment.findOperatorHits);
	// }
	//
	// public List<Map<String, Object>> findModuleHits() {
	// return this.getJdbcTemplateDataAccessObject().find(NamedStatment.findModuleHits);
	// }
}
